/*
 * @(#)GSBaseForm.java 
 *
 * Project: BUS
 *
 * Modify Information:
 * =============================================================================
 *   Author       Date       Description
 *   Jenny     2005-12-05  first release
 *   Jenny     2005-12-19  add parameter iResponse,setResponse(),getResponse()
 * Copyright Notice:
 * =============================================================================
 *    Copyright (c) 2001-2005 Beijing HiTRUST Technology Co., Ltd. 1808 Room, 
 *        Science & Technology Building, No. 9 South Street, Zhong Guan Cun, 
 *        Haidian District, Beijing ,100081, China All rights reserved.
 *
 *    This software is the confidential and proprietary information of
 *        Beijing HiTRUST Technology Co., Ltd. ("Confidential Information").
 *        You shall not disclose such Confidential Information and shall use it
 *        only in accordance with the terms of the license agreement you entered
 *        into with HiTRUST.
 *
 * Warning:
 * =============================================================================
 * 
 */
package com.hitrust.gs.service;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
/**
 * Form基类
 *
 */
public class GSBaseForm extends ActionForm {
	/**
     * 
     */
    private static final long serialVersionUID = 1L;
    private HttpServletRequest iRequest;
    private HttpServletResponse iResponse;
	private HttpSession iHttpSession;
    /**
     * 总行数（用于分页）
     */
    private String choice ;
    
    /**
     * 总记录数（用于分页）
     */
    private int totalRecords ;
    
    /**
     * 页大小（用于分页）
     */
    private int pageSize ;
    
    /**
     * 页数
     */
    private int pageNo ;
    /**
     * @return Returns the choice.
     */

    /**
     * 获得HttpRequest
     * @param aRequest
     */
	public HttpServletRequest getRequest() {
		return iRequest;
	}
    /**
     * 为本地变量iRequest赋值
     * @param aRequest
     */
	public void setRequest(HttpServletRequest aRequest) {
		this.iRequest = aRequest;
	}
    /**
     * 获得HttpSession
     * @return
     */
    public HttpSession getSession() {
        iHttpSession = iRequest.getSession();
        return iHttpSession;
    }
    /**
     * 验证数据有效性
     */
	public ActionErrors validate(ActionMapping aMapping,HttpServletRequest aRequest){
        return null;
    }
    
    /**获得HttpResponse
     * @return Returns the response.
     */
    public HttpServletResponse getResponse() {
        return this.iResponse;
    }
    /**为本地变量iResponse赋值
     * @param aResponse 
     */
    public void setResponse(HttpServletResponse aResponse) {
        this.iResponse = aResponse;
    }

    /**
     * @return 返回变量choice的值.
     */
    public String getChoice() {
        return this.choice;
    }
    /**
     * @param aChoice 设定变量choice的值.
     */
    public void setChoice(String aChoice) {
        this.choice = aChoice;
    }
    /**
     * @return 返回变量httpSession的值.
     */
    public HttpSession getHttpSession() {
        return this.iHttpSession;
    }
    /**
     * @param aHttpSession 设定变量httpSession的值.
     */
    public void setHttpSession(HttpSession aHttpSession) {
        this.iHttpSession = aHttpSession;
    }
    /**
     * @return 返回变量pageNo的值.
     */
    public int getPageNo() {
        return this.pageNo;
    }
    /**
     * @param aPageNo 设定变量pageNo的值.
     */
    public void setPageNo(int aPageNo) {
        this.pageNo = aPageNo;
    }
    /**
     * @return 返回变量pageSize的值.
     */
    public int getPageSize() {
        return this.pageSize;
    }
    /**
     * @param aPageSize 设定变量pageSize的值.
     */
    public void setPageSize(int aPageSize) {
        this.pageSize = aPageSize;
    }
    /**
     * @return 返回变量totalRecords的值.
     */
    public int getTotalRecords() {
        return this.totalRecords;
    }
    /**
     * @param aTotalRecords 设定变量totalRecords的值.
     */
    public void setTotalRecords(int aTotalRecords) {
        this.totalRecords = aTotalRecords;
    }
    
}
